package com.sss.service.impl;


import com.sss.bean.AdminInfoBean;
import com.sss.dao.AdminInfoBeanMapper;
import com.sss.service.IAdminInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 使用@Service注解标注，该类是SpringMVC框架的service层
 */
@Service
public class AdminInfoServiceImpl implements IAdminInfoService {
    /*
 使用注解获取Mybatis框架的Mapper接口的实现类的实例对象
 此处使用了spring框架的IOC和DI
 也使用了面向接口的编程软件原则
 */
    @Autowired
    AdminInfoBeanMapper adminInfoMapper;

    @Override
    public List<AdminInfoBean> queryLoginInfo(AdminInfoBean adminInfoBean) {
        // 调用mapper层的接口方法进行数据库操作
        List<AdminInfoBean> lstAdminInfos = adminInfoMapper.queryLoginInfo(adminInfoBean);
        // 返回结果
        return lstAdminInfos;
    }

}
